import { useRouter } from 'vue-router'
import Xmind from '@/icons/Xmind.vue'
import FlowChart from '@/icons/FlowChart.vue'
import { Document } from '@element-plus/icons-vue'
const useNote = () => {
  const router = useRouter()
  const MapJump = {
    Document: (id) => {
      router.push(`/file/doc/${id}`)
    },
    Xmind: (id) => {
      router.push(`/file/mindmap/${id}`)
    },
    FlowChart: (id) => {
      router.push(`/file/drawio/${id}`)
    },
  }
  const MapComponent = {
    FlowChart,
    Xmind,
    Document,
  }
  const staticNoteList = [
    {
      id: 1,
      label: '笔记文档',
      icon: 'Document',
      name: 'note',
      text: '空白文档',
    },
    {
      id: 2,
      label: '思维导图',
      icon: Xmind,
      name: 'xmind',
      text: '思维导图',
    },
    {
      id: 3,
      label: '流程图',
      icon: FlowChart,
      name: 'flow',
      text: '流程图',
    },
  ]
  return { MapJump, MapComponent, staticNoteList, FlowChart, Xmind, Document }
}
export default useNote
